package com.example.spring_demo.homework;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class autowring_demo_app {
    public static void main(String[] args) {
//        先获取IOC容器
        ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
//获取bean
       autowriting_demo boy=(autowriting_demo) ctx.getBean("a");
        boy.print();
    }
}
